#ifndef TCHART3D_H
#define TCHART3D_H

#include <QFrame>
#include "MainPlot3D.h"
#include <QGridLayout>
#include <QToolBar>
#include <QTabWidget>
#include <QHash>

class GraphicsScene;

class TChart3D : public QFrame
{
    Q_OBJECT

    //MainPlot3D  * surf;
    QGridLayout * grLay;
    QToolBar    * toolPalette;
    QTabWidget  * tabWgt;
    QHash< int, MainPlot3D* > surfList;

    GraphicsScene * scene;

public:
    explicit TChart3D( QWidget *parent = 0 );
    ~TChart3D();

    void OpenCsvData( const QString & fName );
    void OpenBinaryData( const QString & fName );

    void SetScene( GraphicsScene * s ) { scene = s; }

private:
    void createSurface( QVector< double > & data, int _columns, int _rows, const QString & FilePath );
    MainPlot3D * getCurrentSurf();

private slots:
    void sltToolPaletteClick( QAction * a );

};

#endif // TCHART3D_H
